package com.lc.qianrenshiye;

import com.zcx.helper.app.AppApplication;
import com.zcx.helper.app.AppPreferences;

/**
 * Created by Administrator on 2016/3/14.
 */
public class BasePreferences extends AppPreferences {

    public BasePreferences(AppApplication context, String name) {

        super(context, name);

    }

    public void saveIsGuide(boolean isGuide){

        putBoolean("isGuide", isGuide);

    }

    public boolean readIsGuide(){

        return getBoolean("isGuide", true);

    }

    public void saveUserId(String userId){

        putString("UserId", userId);

    }

    public String readUserId(){

        return getString("UserId", "");

    }

    public void saveLogoutUserId(String userId){

        putString("LogoutUserId", userId);

    }

    public String readLogoutUserId(){

        return getString("LogoutUserId", "");

    }

    //店铺id
    public void saveShopId(String shopId){

        putString("SHOP_ID", shopId);

    }

    public String readShopId(){

        return getString("SHOP_ID", "");

    }

     //客服电话
    public void saveServiceTel(String tel){

        putString("ServiceTel", tel);

    }

    public String readServiceTel(){

        return getString("ServiceTel", "");

    }

    public void saveIsLogin(boolean isLogin){

        putBoolean("IsLogin", isLogin);

    }

    public boolean readIsLogin(){

        return getBoolean("IsLogin", false);

    }

    public void saveIsSetTag(boolean isSetTag){

        putBoolean("IsSetTag", isSetTag);

    }

    public boolean readIsSetTag(){

        return getBoolean("IsSetTag", false);

    }

    //保存消息条数
    public void saveMessageCount(int messageCount){

        putInt("MessageCount", messageCount);

    }

    public int readMessageCount(){

        return getInt("MessageCount", 0);

    }



}
